<?php
include_once "xAP-functions/webincludes.php";
$id=intval($_GET["id"]);

echo webpageheader();
$sql="select 
DateStamp,Icon,Temp,WindSpeed,WindDirection,Humidity,Pressure,Visibility
from xAP_Weather_Log
where SourceId=".$id."
order by LogID DESC limit 50
";
$results=dbquery($sql);





// ----------------------------------------------------------------------------------------------------------------------------------------------display
echo "<table width=100%><TR>";
foreach($results[0] as $key=>$item){
	echo "<TD class='normalsmalltext'>".$key."</TD>";
}
echo "</TR>";
foreach($results as $row){
	echo "<TR>";


		foreach($row as $v){
			echo "<TD class='normaltext'>".$v."</td>";
		}



	echo "</TR>";

}
echo "</table>";
echo webpagefooter();
?>